import { buildGetUrl } from '@/core/http/requestUrl.js';

export default class ProjectTemplateController {
  static list(sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/projectTemplate/list', 'post', params, axiosOption, httpOption);
  }

  static view(sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/projectTemplate/view', 'get', params, axiosOption, httpOption);
  }

  static export(sender, params, fileName) {
    return sender.download('/admin/app/projectTemplate/export', params, fileName);
  }

  static parseMdbDatabase(sender, params) {
    return sender.upload('/admin/mdb/tables', params);
  }

  static printUrl(params) {
    return buildGetUrl('/admin/app/projectTemplate/print', params);
  }
  static add(sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/app/projectTemplate/add', 'post', params, axiosOption, httpOption);
  }

  static update(sender, params, axiosOption, httpOption) {
    return sender.doUrl(
      '/admin/app/projectTemplate/update',
      'post',
      params,
      axiosOption,
      httpOption
    );
  }

  static setDefault(sender, params, axiosOption, httpOption) {
    return sender.doUrl(
      '/admin/app/projectTemplate/setDefault',
      'post',
      params,
      axiosOption,
      httpOption
    );
  }

  static delete(sender, params, axiosOption, httpOption) {
    return sender.doUrl(
      '/admin/app/projectTemplate/delete',
      'post',
      params,
      axiosOption,
      httpOption
    );
  }

  static deleteBatch(sender, params, axiosOption, httpOption) {
    return sender.doUrl(
      '/admin/app/projectTemplate/deleteBatch',
      'post',
      params,
      axiosOption,
      httpOption
    );
  }
}
